import { createStore } from 'vuex'
export const store = createStore({
    state: {
        userInfoList: uni.getStorageSync('userInfoList') || [],
        userInfo: uni.getStorageSync('userInfo') || {}
    },
    mutations: {
        setUserInfoList: (state, data) => {
            state.userInfoList = data
            uni.setStorageSync('userInfoList', data)
        },
        setUserInfo: (state, data) => {
            state.userInfo = data
            uni.setStorageSync('userInfo', data)
        }
    }
})